//
// Created by jayyuz on 2021/6/30.
//
#include <jni.h>
#include <string>

extern "C" {
#include "bsdiff/patch.h"
}

extern "C"
JNIEXPORT int JNICALL
Java_com_softbank_bsdiff_BSDiffPatch_patchApk(JNIEnv *env, jobject thiz, jstring source_apk_path,
                                              jstring destination_apk_path,
                                              jstring patch_file_path) {
    return do_patch((*env).GetStringUTFChars(source_apk_path, 0),
                    (*env).GetStringUTFChars(destination_apk_path, 0),
                    (*env).GetStringUTFChars(patch_file_path, 0));
}